<ul class="maintabmenu multipletabmenu">     
    <li><a href="<?php echo base_url();?>administrator/customers">Tất cả khách hàng</a></li>
    <li><a href="<?php echo base_url();?>administrator/customers/add">Thêm mới khách hàng</a></li> 
    <li class="current"><a href="<?php echo base_url();?>administrator/customers/edit/<?php echo $customer->id; ?>">Sửa khách hàng</a></li>   
</ul>  
<div class="content">                	
    <div class="edit-left">
        <form action="<?php echo base_url();?>administrator/customers/edit/<?php echo $customer->id; ?>" method="post" accept-charset="utf-8" id="formID" class="stdform">                    		
            <p><label>Họ tên:</label></p>
            <p><span class="field"><input name="name" value="<?php echo $customer->name; ?>" class="longinput validate[required]" type="text"></span></p>
            <br>
            <p><label>Địa chỉ:</label></p>
            <p><span class="field"><input name="address" value="<?php echo $customer->address; ?>"  class="longinput validate[required]" type="text"></span></p>
            <br>  
            <p><label>Số điện thoại:</label></p>
            <p><span class="field"><input class="longinput validate[required]" name="phone" type="text" value="<?php echo $customer->phone; ?>"></span></p>
            <br>  
            <p>Trạng thái:</p>
            <p>    
                <select name="status">
                    <option value="active" <?php if($customer->status =='active') echo "selected='selected'";?>>Active</option>
                    <option value="disable" <?php if($customer->status =='disable') echo "selected='selected'";?>>Disable</option>
                    <option value="pending" <?php if($customer->status =='pending') echo "selected='selected'";?>>Pending</option>                   
                </select>                         
            </p>  
            <p><label>Fax:</label></p>
            <p><span class="field"><input class="longinput" name="fax" type="text" value="<?php echo $customer->fax; ?>"></span></p>
            <br>                                                     
            <p><label>Email:</label></p>
            <p><span class="field"><input class="longinput" name="email" type="text" value="<?php echo $customer->email; ?>"></span></p>
            <br>  
            <p><label>Số tài khoản:</label></p>
            <p><span class="field"><input class="longinput" name="credit_card" type="text" value="<?php echo $customer->credit_card; ?>"></span></p>
            <br>   
            <p><label>Ngân hàng:</label></p>
            <p><span class="field"><input class="longinput" name="bank_name" type="text" value="<?php echo $customer->bank_name; ?>"></span></p>
            <br>       
                              
            <p class="stdformbutton">
                <input name="submit" value="Sửa" class="submit radius2" type="submit">                                
                <input value="Hủy" class="reset radius2" type="reset">
            </p>                            
        </form>                                       
    </div>
    <div class="list-right">
         <div class="contenttitle radiusbottom0">        
            <h2 class="table"><span>Danh sách khách hàng</span></h2>
        </div><!--contenttitle-->
        <div class="tableoptions">                                 
            <form name="frmfilter" method="post" action="<?php echo base_url();?>administrator/customers/edit/<?php echo $customer->id; ?>" >                        	
                <button class="deletebutton radius3" name="delete_term" value="<?php echo base_url();?>administrator/customers/delete" title="table2">Delete Selected</button> &nbsp;                                                                              
                <input type="text" name="txtKeyWord" class="input-keyword" value="<?php if($key_word != '~') echo $key_word; ?>">&nbsp;           
                <input type="submit" class="btn" value="Tìm kiếm"/>
            </form>
        </div><!--tableoptions-->	
        <table id="table2" class="stdtable stdtablecb" border="0" cellpadding="0" cellspacing="0">
            <colgroup>
                <col class="con0">
                <col class="con1">
                <col class="con0">
                <col class="con1">

            </colgroup>
            <thead>
                <tr>
                    <th class="head0" width="10"><input class="checkall" type="checkbox"></th>
                    <th class="head1">Họ tên</th>
                    <th class="head0">Địa chỉ</th>                    
                    <th class="head1">Email</th>                    
                    <th class="head0">Trạng thái</th>
                    <th class="head1" width="60">&nbsp;</th>
                </tr>
            </thead>
            <tfoot>
                <tr>
                    <th class="head0" width="10"><input class="checkall" type="checkbox"></th>
                    <th class="head1">Họ tên</th>
                    <th class="head0">Địa chỉ</th>                    
                    <th class="head1">Email</th>                    
                    <th class="head0">Trạng thái</th>
                    <th class="head1" width="60">&nbsp;</th>
                </tr>
            </tfoot>
            <tbody>
                <?php 
                    foreach ($list_customer as $customer)
                    {
                ?>
                <tr>
                    <td class="center"><input value="<?php echo $customer->id;?>" type="checkbox"></td>
                    <td>
                    <?php 
                        echo $customer->name;
                    ?>
                    </td>
                    <td><?php echo $customer->address;?></td>                    
                    <td><?php echo $customer->email;?></td>                                                                                                         
                    <td><?php echo $customer->status;?></td>                 
                    <td class="center"><a class="edit" title="Sửa" href="<?php echo base_url();?>administrator/customers/edit/<?php echo $customer->id;?>">Sửa</a> &nbsp; <a class="delete" id="<?php echo $customer->id;?>" name="delete" title="Xóa" href="<?php echo base_url();?>administrator/customers/delete/">Xóa</a></td>
                </tr>  
                <?php
                    }
                ?>
            </tbody>
           
        </table>         
        <?php echo $list_link;?>       
    </div>                                  
</div><!--content-->
